﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Pan
{
    public partial class Common : System.Web.UI.MasterPage
    {
        public int uid; 
        public string uname;

        public int side = 0;
        public bool needLogin = false;

        public Label RespLabel;

        protected void Page_Init(object sender, EventArgs e)
        {
            this.uid = Convert.ToString(Session["uid"]) != string.Empty ? Convert.ToInt32(Session["uid"]) : 0;
            this.uname = Convert.ToString(Session["uname"]) != string.Empty ? Convert.ToString(Session["uname"]) : "";
            this.RespLabel = Resp;
            if (this.needLogin)
            {
                if (this.uid <= 0)
                {
                    Response.Redirect("/login.aspx");
                }
            }
        }
    }
}